package com.da.javatest.leetCode2;

public class Code771 {
    public static void main(String[] args) {

    }

    public int numJewelsInStones(String J, String S) {
        int total = 0;
        char[] diamond = J.toCharArray();
        char[] stone = S.toCharArray();
        for (char c : stone) {
            for (char c1 : diamond) {
                if (c == c1)
                    total++;
            }
        }
        return total;
    }
}
